<script>
  import { Router, Link, Route } from "svelte-routing";
  import Index from "./routes/index.svelte";
  import Book from "./routes/book.svelte";
	import Bookinfo from "./routes/bookinfo.svelte";

  export let url = "";
	$:console.log(url);
</script>

<Router {url}>
	<nav>
    <Link to="/">Home</Link>
    <Link to="/book">book</Link>
    <Link to="/bookinfo/1">bookinfo</Link>
  </nav>
  <div>
    <Route path="/bookinfo/:id" component={Bookinfo} />
    <Route path="/book" component={Book} />
    <Route path="/"><Index /></Route>
  </div>
</Router>